<div class="problemindexholder" problemindex="C">
 <div class="ttypography">
  <div class="problem-statement">
   <div class="header">
    <div class="title">
     C. K-Dominant Character
    </div>
    <div class="time-limit">
     <div class="property-title">
      time limit per test
     </div>
     2 seconds
    </div>
    <div class="memory-limit">
     <div class="property-title">
      memory limit per test
     </div>
     256 megabytes
    </div>
    <div class="input-file">
     <div class="property-title">
      input
     </div>
     standard input
    </div>
    <div class="output-file">
     <div class="property-title">
      output
     </div>
     standard output
    </div>
   </div>
   <div>
    <p>
     You are given a string
     <span class="tex-span">
      <i>
       s
      </i>
     </span>
     consisting of lowercase Latin letters. Character
     <span class="tex-span">
      <i>
       c
      </i>
     </span>
     is called
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     -dominant iff each substring of
     <span class="tex-span">
      <i>
       s
      </i>
     </span>
     with length at least
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     contains this character
     <span class="tex-span">
      <i>
       c
      </i>
     </span>
     .
    </p>
    <p>
     You have to find minimum
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     such that there exists at least one
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     -dominant character.
    </p>
   </div>
   <div class="input-specification">
    <div class="section-title">
     Input
    </div>
    <p>
     The first line contains string
     <span class="tex-span">
      <i>
       s
      </i>
     </span>
     consisting of lowercase Latin letters (
     <span class="tex-span">
      1 ≤ |
      <i>
       s
      </i>
      | ≤ 100000
     </span>
     ).
    </p>
   </div>
   <div class="output-specification">
    <div class="section-title">
     Output
    </div>
    <p>
     Print one number — the minimum value of
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     such that there exists at least one
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     -dominant character.
    </p>
   </div>
   <div class="sample-tests">
    <div class="section-title">
     Examples
    </div>
    <div class="sample-test">
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>abacaba<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>2<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>zzzzz<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>1<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>abcde<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>3<br/></pre>
     </div>
    </div>
   </div>
  </div>
  <p>
  </p>
 </div>
</div>
